package com.ymttest.database.mapping;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.ymttest.database.model.YmtOrderExt;
import com.ymttest.database.model.YmtOrders;
import com.ymttest.database.model.YmtOrdersExample;

/************************************************************************************
 * @File name :YmtOrdersMapper.java
 * @Author : zhouyi
 * @Date : 2016年5月16日
 * @Copyright : 洋码头
 ************************************************************************************/
public interface YmtOrdersMapper {
	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int countByExample(YmtOrdersExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int deleteByExample(YmtOrdersExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int deleteByPrimaryKey(Integer iorderid);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int insert(YmtOrders record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int insertSelective(YmtOrders record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	List<YmtOrders> selectByExample(YmtOrdersExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	YmtOrders selectByPrimaryKey(Integer iorderid);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int updateByExampleSelective(@Param("record") YmtOrders record,
			@Param("example") YmtOrdersExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int updateByExample(@Param("record") YmtOrders record,
			@Param("example") YmtOrdersExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int updateByPrimaryKeySelective(YmtOrders record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds
	 * to the database table Ymt_Orders
	 *
	 * @mbggenerated Wed Aug 19 09:57:01 CST 2015
	 */
	int updateByPrimaryKey(YmtOrders record);

	int updateOrderStatusByOrderId(Map m);

	int updateOrderAddtimeByOrderId(Map m);

	YmtOrders selectLast();

	/**
	 * 根据sellerid查询一条YmtOrderExt记录
	 * 
	 * @param m
	 *            {sid:288484}
	 * @return
	 */
	YmtOrderExt selectOneYmtOrderExt(Map m);

	List<Map> selectAppSellerOrders(Map m);

	List<Map> selectAppSellerOrdersTestData(Map m);
	List<Map> selectOrders(Map m);
	List<Map> selectOrders2(Map m);
	
	YmtOrders selectEarlyOrderInfo();
	
	List<YmtOrders> selectbyMainOrder(Map m);
	
	List<YmtOrders> selectReceivedLastOrder(int iTradingStatus);
	List<YmtOrders> selectbyOrderId(int iOrderId);
	
	List<YmtOrders> selectbySellerId(int sellerId);
	List<YmtOrders> selectbyStatus(int iTradingStatus);
}